﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace LdtJudge.DataEngine.Model.XMLConfigModel.LawElementModel
{
    [Serializable]
    [XmlRootAttribute("root", IsNullable = false)]
    public class LawConfigModel
    {
        [XmlElementAttribute("casetype", IsNullable = false)]
        public List<LawCaseType> lawCaseTypeList { get; set; }

        [XmlElementAttribute("law", IsNullable = false)]
        public List<LawDuctionModel> lawDuctionModelList { get; set; }


    }
    public class LawCaseType
    {
        [XmlAttribute("id")]
        public string id { get; set; }
        [XmlAttribute("parentpath")]
        public string parentpath { get; set; }
    }
    public class LawDuctionModel
    {
        [XmlAttribute("xmlpath")]
        public string xmlpath { get; set; }
        [XmlElementAttribute("prov", IsNullable = false)]
        public List<LawProvDuctionModel> lawProvDuctionModelList { get; set; }
        [XmlElementAttribute("attribute", IsNullable = false)]
        public List<LawAttribute> lawAttributesList { get; set; }
    }

    public class LawProvDuctionModel
    {
        [XmlAttribute("xmlpath")]
        public string xmlpath { get; set; }
        [XmlElementAttribute("clause", IsNullable = false)]
        public List<LawProvClauseDuctionModel> lawProvClauseDuctionModelList { get; set; }
        [XmlElementAttribute("attribute", IsNullable = false)]
        public List<LawAttribute> lawAttributesList { get; set; }
    }

    public class LawProvClauseDuctionModel
    {
        [XmlAttribute("xmlpath")]
        public string xmlpath { get; set; }
        [XmlElementAttribute("item", IsNullable = false)]
        public List<LawProvClauseItemDuctionModel> lawProvClauseItemDuctionModelList { get; set; }
        [XmlElementAttribute("attribute", IsNullable = false)]
        public List<LawAttribute> lawAttributesList { get; set; }
    }

    public class LawProvClauseItemDuctionModel
    {
        [XmlAttribute("xmlpath")]
        public string xmlpath { get; set; }
        [XmlElementAttribute("attribute", IsNullable = false)]
        public List<LawAttribute> lawAttributesList { get; set; }
    }

    public class LawAttribute
    {
        [XmlAttribute("name")]
        public string name { get; set; }
        [XmlAttribute("tablename")]
        public string tablename { get; set; }


    }
}
